﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace TankIt
{
    public class Converter
    {
        UdpAnySourceMulticastChannel client;

        public Converter(UdpAnySourceMulticastChannel client){
            this.client=client;
        }

        public void enviaDados(float posx,float posy,float rotation, bool disparo)
        {
            int disp = 0;
            if (disparo) disp = 1;
            String aEnviar = "" + posx + " " + posy + " " + rotation + " " + disp + " "+1;
            client.Send(aEnviar);
        }


        //public Unmarshled receive(float x,float y)
        //{
        //    return new Unmarshled(client.received,x,y);
        //}

    }
}
